home *** CD-ROM | disk | FTP | other *** search
/ Languguage OS 2 / Languguage OS II Version 10-94 (Knowledge Media)(1994).ISO / gnu / libg_261.zip / libg_261 / libg++ / old-stream / Fmodes.h < prev    next >
C/C++ Source or Header  |  1992-01-17  |  924b  |  34 lines

  1.  
  2. #ifndef _Fmodes_h
  3. #ifdef __GNUG__
  4. #pragma interface
  5. #endif
  6. #define _Fmodes_h 1
  7.  
  8. enum io_mode                    // known unix file IO modes
  9. {
  10.   io_readonly   = 0,            
  11.   io_writeonly  = 1,
  12.   io_readwrite  = 2, 
  13.   io_appendonly = 3,
  14.   io_append     = 4,            // append, plus allow reads
  15. };
  16.  
  17. enum access_mode                // ways to open a file
  18. {
  19.   a_createonly  = 0,            // create, fail if file exists
  20.   a_create      = 1,            // create if doesn't exist, else truncate
  21.   a_useonly     = 2,            // use (no truncate)  fail if doesn't exist
  22.   a_use         = 3,            // use (no truncate), create if doesn't exist
  23. };
  24.  
  25. enum state_value                // File states
  26.   _good         = 0,            // all is well
  27.   _eof          = 1,            // at eof
  28.   _fail         = 2,            // logical or physical IO error
  29.   _bad          = 4             // unopened/corrupted
  30. };
  31.  
  32. #endif
  33.